package com.xu.mapper;

import com.xu.pojo.Course;
import com.xu.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface CourseMapper {
    List<Course> queryCourse();
    List<Course> queryCourseIfIdNameCollege( @Param("queryCondition") String queryCondition, @Param("collegeId") int collegeId);
    List<Course> queryCourseByTeacherId(int teacherId);
    int queryCourseNumByCourseIdTeacherId(@Param("courseId") int courseId,@Param("teacherId") int teacherId);
    Course queryCourseById(int courseId);
    int deleteCourseByTeacherId(int teacherId);  //删除该老师的所有课程
    int deleteCourseByCourseId(int courseId);
    int addCourse(Course course);
    int updateCourse(Course course);
    List<Course> queryCourseByCollegeId(int collegeId);
}
